package com.flyduck.modules.system.mapper;

import com.flyduck.modules.system.domain.SysUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserRoleMapper {
    int deleteByPrimaryKey(@Param("userId") Long userId, @Param("roleId") Long roleId);

    int insert(SysUserRole record);

    int insertSelective(SysUserRole record);

    /**
     * 根据用户id查询
     * @param userId
     * @return
     */
    List<SysUserRole> findByUserId(Long userId);

    /**
     * 根据用户id删除
     * @param userId
     * @return
     */
    void deleteByUserId(Long userId);
}